using System.Data;
using smp.QueryDb.Structure;

namespace smp.ButterflyCakes.Repository.Databases
{
	#region database class

	public class Db
	{
		public static Attachments Attachments = new Attachments();
		public static CakeFlavour CakeFlavour = new CakeFlavour();
		public static CakeFlavourType CakeFlavourType = new CakeFlavourType();
		public static Component Component = new Component();
		public static ComponentDecoration ComponentDecoration = new ComponentDecoration();
		public static ComponentFlavour ComponentFlavour = new ComponentFlavour();
		public static ComponentSize ComponentSize = new ComponentSize();
		public static Contact Contact = new Contact();
		public static Decoration Decoration = new Decoration();
		public static DecorationType DecorationType = new DecorationType();
		public static Diagram Diagram = new Diagram();
		public static EntityStage EntityStage = new EntityStage();
		public static FillingFlavour FillingFlavour = new FillingFlavour();
		public static FillingType FillingType = new FillingType();
		public static IncompatibleFillingForCake IncompatibleFillingForCake = new IncompatibleFillingForCake();
		public static IncompatibleFillingForFilling IncompatibleFillingForFilling = new IncompatibleFillingForFilling();
		public static Order Order = new Order();
	}

	#endregion

	#region Tables and Views

	public class Attachments : Table
	{
		 public Attachments() : base("ButterflyCakes", "dbo", "Attachments")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			Description = AddColumn("Description", DbType.String, true, 500);
			FileContent = AddColumn("FileContent", DbType.Binary, false);
			FileExtension = AddColumn("FileExtension", DbType.String, false, 25);
			FileName = AddColumn("FileName", DbType.String, false, 500);
			IsImage = AddColumn("IsImage", DbType.Boolean, false);
			MimeType = AddColumn("MimeType", DbType.String, false, 100);
			OrderId = AddColumn("OrderId", DbType.Guid, true);
		}
		public static Id Id;
		public static Column Description;
		public static Column FileContent;
		public static Column FileExtension;
		public static Column FileName;
		public static Column IsImage;
		public static Column MimeType;
		public static Column OrderId;
	}

	public class CakeFlavour : Table
	{
		 public CakeFlavour() : base("ButterflyCakes", "dbo", "CakeFlavour")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			CanCarve = AddColumn("CanCarve", DbType.Boolean, false);
			Name = AddColumn("Name", DbType.String, false, 100);
			TypeId = AddColumn("TypeId", DbType.Guid, false);
		}
		public static Id Id;
		public static Column CanCarve;
		public static Column Name;
		public static Column TypeId;
	}

	public class CakeFlavourType : Table
	{
		 public CakeFlavourType() : base("ButterflyCakes", "dbo", "CakeFlavourType")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			CanCarve = AddColumn("CanCarve", DbType.Boolean, false);
			IsCompatibleWith3DCakes = AddColumn("IsCompatibleWith3DCakes", DbType.Boolean, false);
			IsCompatibleWithCupCakes = AddColumn("IsCompatibleWithCupCakes", DbType.Boolean, false);
			IsCompatibleWithGiantCakes = AddColumn("IsCompatibleWithGiantCakes", DbType.Boolean, false);
			Name = AddColumn("Name", DbType.String, true, 100);
		}
		public static Id Id;
		public static Column CanCarve;
		public static Column IsCompatibleWith3DCakes;
		public static Column IsCompatibleWithCupCakes;
		public static Column IsCompatibleWithGiantCakes;
		public static Column Name;
	}

	public class Component : Table
	{
		 public Component() : base("ButterflyCakes", "dbo", "Component")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			ButtercreamId = AddColumn("ButtercreamId", DbType.Guid, true);
			ComponentType = AddColumn("ComponentType", DbType.Int32, true);
			CoveringColour = AddColumn("CoveringColour", DbType.String, true, 10);
			CoveringType = AddColumn("CoveringType", DbType.Int32, true);
			FillingColour = AddColumn("FillingColour", DbType.String, true, 10);
			FinishType = AddColumn("FinishType", DbType.Int32, true);
			GanacheId = AddColumn("GanacheId", DbType.Guid, true);
			Height = AddColumn("Height", DbType.Int32, true);
			HeightType = AddColumn("HeightType", DbType.Int32, true);
			IsCarved = AddColumn("IsCarved", DbType.Boolean, true);
			NumberOfFlavours = AddColumn("NumberOfFlavours", DbType.Int32, true);
			NumberOfStripedCakes = AddColumn("NumberOfStripedCakes", DbType.Int32, true);
			OrderId = AddColumn("OrderId", DbType.Guid, false);
			Portions = AddColumn("Portions", DbType.Int32, true);
			PreserveId = AddColumn("PreserveId", DbType.Guid, true);
			Quantity = AddColumn("Quantity", DbType.Int32, true);
			ShapeBuilderActiveCellString = AddColumn("ShapeBuilderActiveCellString", DbType.String, true, -1);
			Title = AddColumn("Title", DbType.String, true, 250);
		}
		public static Id Id;
		public static Column ButtercreamId;
		public static Column ComponentType;
		public static Column CoveringColour;
		public static Column CoveringType;
		public static Column FillingColour;
		public static Column FinishType;
		public static Column GanacheId;
		public static Column Height;
		public static Column HeightType;
		public static Column IsCarved;
		public static Column NumberOfFlavours;
		public static Column NumberOfStripedCakes;
		public static Column OrderId;
		public static Column Portions;
		public static Column PreserveId;
		public static Column Quantity;
		public static Column ShapeBuilderActiveCellString;
		public static Column Title;
	}

	public class ComponentDecoration : Table
	{
		 public ComponentDecoration() : base("ButterflyCakes", "dbo", "ComponentDecoration")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			Colour = AddColumn("Colour", DbType.String, true, 10);
			ComponentId = AddColumn("ComponentId", DbType.Guid, false);
			Count = AddColumn("Count", DbType.Int32, false);
			Description = AddColumn("Description", DbType.String, true, -1);
			PresetDecorationId = AddColumn("PresetDecorationId", DbType.Guid, true);
		}
		public static Id Id;
		public static Column Colour;
		public static Column ComponentId;
		public static Column Count;
		public static Column Description;
		public static Column PresetDecorationId;
	}

	public class ComponentFlavour : Table
	{
		 public ComponentFlavour() : base("ButterflyCakes", "dbo", "ComponentFlavour")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			CakeFlavourId = AddColumn("CakeFlavourId", DbType.Guid, true);
			CakeFlavourTypeId = AddColumn("CakeFlavourTypeId", DbType.Guid, true);
			ComponentId = AddColumn("ComponentId", DbType.Guid, false);
		}
		public static Id Id;
		public static Column CakeFlavourId;
		public static Column CakeFlavourTypeId;
		public static Column ComponentId;
	}

	public class ComponentSize : Table
	{
		 public ComponentSize() : base("ButterflyCakes", "dbo", "ComponentSize")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			ComponentId = AddColumn("ComponentId", DbType.Guid, false);
			CustomShapeDetail = AddColumn("CustomShapeDetail", DbType.String, true, -1);
			Portions = AddColumn("Portions", DbType.Int32, true);
			Shape = AddColumn("Shape", DbType.Int32, true);
			Size = AddColumn("Size", DbType.Int32, true);
			Width = AddColumn("Width", DbType.Int32, true);
		}
		public static Id Id;
		public static Column ComponentId;
		public static Column CustomShapeDetail;
		public static Column Portions;
		public static Column Shape;
		public static Column Size;
		public static Column Width;
	}

	public class Contact : Table
	{
		 public Contact() : base("ButterflyCakes", "dbo", "Contact")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			County = AddColumn("County", DbType.String, true, 250);
			Email = AddColumn("Email", DbType.String, true, 250);
			Facebook = AddColumn("Facebook", DbType.String, true, 250);
			FirstName = AddColumn("FirstName", DbType.String, true, 100);
			HouseNameNumber = AddColumn("HouseNameNumber", DbType.String, true, 25);
			LastName = AddColumn("LastName", DbType.String, true, 100);
			PhoneNumber = AddColumn("PhoneNumber", DbType.String, true, 15);
			PostCode = AddColumn("PostCode", DbType.String, true, 10);
			SearchName = AddColumn("SearchName", DbType.String, true, 250);
			Street = AddColumn("Street", DbType.String, true, 250);
			Title = AddColumn("Title", DbType.String, true, 10);
			Town = AddColumn("Town", DbType.String, true, 250);
		}
		public static Id Id;
		public static Column County;
		public static Column Email;
		public static Column Facebook;
		public static Column FirstName;
		public static Column HouseNameNumber;
		public static Column LastName;
		public static Column PhoneNumber;
		public static Column PostCode;
		public static Column SearchName;
		public static Column Street;
		public static Column Title;
		public static Column Town;
	}

	public class Decoration : Table
	{
		 public Decoration() : base("ButterflyCakes", "dbo", "Decoration")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			CanSetColour = AddColumn("CanSetColour", DbType.Boolean, false);
			DecorationTypeId = AddColumn("DecorationTypeId", DbType.Guid, false);
			Description = AddColumn("Description", DbType.String, true, -1);
			Name = AddColumn("Name", DbType.String, true, 100);
		}
		public static Id Id;
		public static Column CanSetColour;
		public static Column DecorationTypeId;
		public static Column Description;
		public static Column Name;
	}

	public class DecorationType : Table
	{
		 public DecorationType() : base("ButterflyCakes", "dbo", "DecorationType")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			Name = AddColumn("Name", DbType.String, true, 100);
		}
		public static Id Id;
		public static Column Name;
	}

	public class Diagram : Table
	{
		 public Diagram() : base("ButterflyCakes", "dbo", "Diagram")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			ComponentId = AddColumn("ComponentId", DbType.Guid, false);
			Description = AddColumn("Description", DbType.String, true, 500);
			Html = AddColumn("Html", DbType.String, true, -1);
			OrderId = AddColumn("OrderId", DbType.Guid, false);
		}
		public static Id Id;
		public static Column ComponentId;
		public static Column Description;
		public static Column Html;
		public static Column OrderId;
	}

	public class EntityStage : Table
	{
		 public EntityStage() : base("ButterflyCakes", "dbo", "EntityStage")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			ComponentId = AddColumn("ComponentId", DbType.Guid, false);
			Created = AddColumn("Created", DbType.DateTime, false);
			Index = AddColumn("Index", DbType.Int32, false);
			OrderId = AddColumn("OrderId", DbType.Guid, false);
			PreviousStageId = AddColumn("PreviousStageId", DbType.Guid, true);
			Stage = AddColumn("Stage", DbType.Int32, false);
			Title = AddColumn("Title", DbType.String, false, 250);
		}
		public static Id Id;
		public static Column ComponentId;
		public static Column Created;
		public static Column Index;
		public static Column OrderId;
		public static Column PreviousStageId;
		public static Column Stage;
		public static Column Title;
	}

	public class FillingFlavour : Table
	{
		 public FillingFlavour() : base("ButterflyCakes", "dbo", "FillingFlavour")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			FillingTypeId = AddColumn("FillingTypeId", DbType.Guid, false);
			Name = AddColumn("Name", DbType.String, false, 100);
		}
		public static Id Id;
		public static Column FillingTypeId;
		public static Column Name;
	}

	public class FillingType : Table
	{
		 public FillingType() : base("ButterflyCakes", "dbo", "FillingType")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			Name = AddColumn("Name", DbType.String, false, 100);
		}
		public static Id Id;
		public static Column Name;
	}

	public class IncompatibleFillingForCake : Table
	{
		 public IncompatibleFillingForCake() : base("ButterflyCakes", "dbo", "IncompatibleFillingForCake")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			CakeFlavourId = AddColumn("CakeFlavourId", DbType.Guid, false);
			FillingFlavourId = AddColumn("FillingFlavourId", DbType.Guid, false);
		}
		public static Id Id;
		public static Column CakeFlavourId;
		public static Column FillingFlavourId;
	}

	public class IncompatibleFillingForFilling : Table
	{
		 public IncompatibleFillingForFilling() : base("ButterflyCakes", "dbo", "IncompatibleFillingForFilling")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			BaseFillingFlavour = AddColumn("BaseFillingFlavour", DbType.Guid, false);
			FillingFlavour = AddColumn("FillingFlavour", DbType.Guid, false);
		}
		public static Id Id;
		public static Column BaseFillingFlavour;
		public static Column FillingFlavour;
	}

	public class Order : Table
	{
		 public Order() : base("ButterflyCakes", "dbo", "Order")
		{
			Id = SetId("Id", DbType.Guid, IdGenerationType.ApplicationGenerated);
			ContactId = AddColumn("ContactId", DbType.Guid, true);
			Created = AddColumn("Created", DbType.DateTime, false);
			CurrentLastComponentId = AddColumn("CurrentLastComponentId", DbType.Guid, true);
			CurrentLastStageId = AddColumn("CurrentLastStageId", DbType.Guid, true);
			Due = AddColumn("Due", DbType.DateTime, true);
			Status = AddColumn("Status", DbType.Int32, false);
			Summary = AddColumn("Summary", DbType.String, true, -1);
			Title = AddColumn("Title", DbType.String, true, 250);
		}
		public static Id Id;
		public static Column ContactId;
		public static Column Created;
		public static Column CurrentLastComponentId;
		public static Column CurrentLastStageId;
		public static Column Due;
		public static Column Status;
		public static Column Summary;
		public static Column Title;
	}

	#endregion

	#region Procedures

	#endregion

}
